package main

import "fmt"

func main() {
	c := add(12, 12)
	fmt.Println("c =", c)

	d, f := sub(12, 12)
	fmt.Println("d =", d)
	fmt.Println("f =", f)

	g, h := apply(12, 12)
	fmt.Println("g =", g)
	fmt.Println("h =", h)
}

func add(a int, b int) int {
	return a + b
}

func sub(a int, b int) (int, string) {
	return a + b, "invoke sub"
}

/**
* 返回值类型不一样
 */
func apply(a int, b int) (r1 int, r2 string) {
	r1 = 100
	r2 = "1111"
	return
}

/**
* 返回值类型一样
 */
func multi(a int, b int) (r1, r2 string) {
	r1 = "100"
	r2 = "1111"
	return
}
